package com.bestom.sharingbookcase.entity;

/**
 * @author shulman
 */

public enum SendHexStep {

    /*
    * 参数配置
    * APP→MCU	A5 "ID" D0 08 W1 W2 W3 W4 W5 W6 W7 W8 "CHK" CC
    * MCU→APP	5A "ID" D0 08 W1 W2 W3 W4 W5 W6 W7 W8 "CHK" CC
    * */
    ParameterConfiguration("D008"),

    /*
     * 书格存书信息更新
     * APP→MCU	A5 "ID" D1 01 XX "CHK" CC
     * MCU→APP	5A "ID" D1 01 XX "CHK" CC
     * XX=存书信息;(00=有书,FF=无书)
     * */
    SaveBooks("D101"),

    /*
     * 键值上报
     * MCU→APP	5A "ID" C0 01 XX "CHK" CC
     * XX=按键功能;(01=长按,02=双击)
     * */
    KeyReport("C001"),

    /*
     * 借书操作
     * APP→MCU	A5 "ID" C1 01 XX "CHK" CC
     * MCU→APP	5A "ID" C1 01 XX "CHK" CC
     * MCU→APP	5A "ID" C1 01 YY "CHK" CC
     * XX=借书功能激活时限;(02~FF;单位:秒)
     * */
    BorrowBooks("C101"),

    /*
     * 还书操作
     * APP→MCU	A5 "ID" C2 01 XX "CHK" CC
     * MCU→APP	5A "ID" C2 01 XX "CHK" CC
     * MCU→APP	5A "ID" C2 01 YY "CHK" CC
     * XX=还书功能激活时限;(02~FF;单位:秒)
     * */
    ReturnBook("C201"),

    /*
     * 子机ID查询
     * APP→MCU	A5  FF  F0 01 00 "CHK" CC
     * MCU→APP	5A "ID" F0 01 00 "CHK" CC
     * */
    SelectId("FFF00100"),

    /*
     * 子机参数查询
     * APP→MCU	A5 "ID" F1 01 00 "CHK" CC
     * MCU→APP	5A "ID" F1 08 W1 W2 W3 W4 W5 W6 W7 W8 "CHK" CC
     * */
    SelectParameter("F10100"),

    /*
     * 子机状态查询
     * APP→MCU	A5 "ID" F2 01 00 "CHK" CC
     * MCU→APP	5A "ID" F2 01 XX "CHK" CC
     * */
    SelectStatus("F20100"),

    /*
     * 子机版本查询
     * APP→MCU	A5 "ID" F3 01 00 "CHK" CC
     * MCU→APP	5A "ID" F3 01 XX "CHK" CC
     * */
    SelectVersion("F30100"),

    // 命令组合
    CommandCombination("A5%sCC"),

    ;

    private String hexString;

    SendHexStep(String hexString) {
        this.hexString = hexString;
    }

    public String getHexString() {
        return hexString;
    }
}
